package com.sl.biz.modular.process.controller;

import com.sl.biz.modular.process.controller.request.ProcessRunHistoryQueryProcessListRequest;
import com.sl.biz.modular.process.controller.request.ProcessRunHistoryQueryProcessStepDataListRequest;
import com.sl.biz.modular.process.controller.request.ProcessRunHistoryQueryProcessStepListRequest;
import com.sl.biz.modular.process.controller.response.ProcessRunHistoryListVO;
import com.sl.biz.modular.process.controller.response.ProcessRunHistoryStepListVO;
import com.sl.biz.modular.process.service.ProcessRunHistoryBizService;
import lombok.RequiredArgsConstructor;
import org.anyline.entity.DataSet;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/process/run/history")
@RequiredArgsConstructor
public class ProcessRunHistoryController {

    private final ProcessRunHistoryBizService processRunHistoryBizService;


    @PostMapping("/run_date_list")
    public List<String> runDateList() {
        return processRunHistoryBizService.runDateList();
    }


    @PostMapping("/process_list")
    public List<ProcessRunHistoryListVO> processList(@RequestBody ProcessRunHistoryQueryProcessListRequest processListRequest) {
        return processRunHistoryBizService.processList(processListRequest);
    }

    @PostMapping("/step_list")
    public List<ProcessRunHistoryStepListVO> stepList(@RequestBody ProcessRunHistoryQueryProcessStepListRequest processListRequest) {
        return processRunHistoryBizService.stepList(processListRequest);
    }

    @PostMapping("/step_data_list")
    public Map<String,Object> stepDataList(@RequestBody ProcessRunHistoryQueryProcessStepDataListRequest processListRequest) {
        return processRunHistoryBizService.stepDataList(processListRequest);
    }

}
